﻿/****************************** Module Header ******************************\
 * Module Name:  IPagger.cs
 * Module Version:  1.0.0 (2012-7-24)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This interface is used to rule the generics pagger class. It define the 
 * common method for the pagger class.
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/
using System;
using System.Collections.Generic;

namespace UCF.Core
{
    public interface IPagger
    {
        /// <summary>
        /// 第一页页码
        /// </summary>
        int FirstPage { get; }

        /// <summary>
        /// 上一页页码
        /// </summary>
        int PrevPage { get; }

        /// <summary>
        /// 下一页页码
        /// </summary>
        int NextPage { get; }

        /// <summary>
        /// 最末页页码
        /// </summary>
        int LastPage { get; }

        /// <summary>
        /// 当前页页码
        /// </summary>
        int PageIndex { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        int PageCount { get; }

        /// <summary>
        /// 分页尺寸
        /// </summary>
        int PageSize { get; set; }

        /// <summary>
        /// 总记录数
        /// </summary>
        int RecordCount { get; }

        /// <summary>
        /// 当前游标在总记录集中的位置
        /// </summary>
        int RecordIndex { get; }

        /// <summary>
        /// 当前页记录数
        /// </summary>
        int ListCount { get; }

        /// <summary>
        /// 当前游标在列表中的位置
        /// </summary>
        int ListIndex { get; }

        /// <summary>
        /// 移动游标到下一条记录
        /// </summary>
        /// <returns>如果有下一条记录则返回true，否则返回false</returns>
        bool Next();
    }
}
